package cn.edu.zafu.bigdata.lhff;

class Book {
    private final String title;
    private final String author;
    private final double price;

    public Book(String title, String author, double price) {
        this.title = title;
        this.author = author;
        this.price = price;
    }

    public String toString() {
        return String.format("Book[title=%s, author=%s, price=%.2f]", title, author, price);
    }
}

public class BookTest {
    public static void main(String[] args) {
        Book book1 = new Book("Java Programming", "John Doe", 29.99);
        Book book2 = new Book("美味火鸡面的制作方法", "张三", 39.99);
        Book book3 = new Book("游戏攻略", "李四", 29.97);

        System.out.println(book1);
        System.out.println(book2);
        System.out.println(book3);
    }
}